package com.fowo.api.model.third.inventory.info;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fowo.api.common.validator.*;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/**
 * 第三方库存信息 预览导入辅助模型(全字段为文本类型)
 * @author yl_ls
 */
@Getter
@Setter
public class ThirdInventoryInfoImportPo {

  /** 所属库存明细 */
  @ExcelProperty("所属库存明细")
  @Size(max = 100, message = "所属库存明细长度不能超过100")
  private String parentInventoryDetailOrderlistSku;

  @ExcelIgnore
  @Schema(title = "所属库存明细")
  private String parentInventoryDetailOrderlist;

  /** 可用量 */
  @ExcelProperty("可用量")
  @IntegerString(message = "可用量数值格式不正确", label = "可用量")
  private String qtySellable;

  /** 待上架库存 */
  @ExcelProperty("待上架库存")
  @IntegerString(
    message = "待上架库存数值格式不正确",
    label = "待上架库存",
    min = 0
  )
  private String qtyPending;

  /** 锁定量 */
  @ExcelProperty("锁定量")
  @IntegerString(message = "锁定量数值格式不正确", label = "锁定量", min = 0)
  private String qtyReserved;

  /** 备货在途 */
  @ExcelProperty("备货在途")
  @IntegerString(
    message = "备货在途数值格式不正确",
    label = "备货在途",
    min = 0
  )
  private String qtyOnway;

  /** 名称 */
  @ExcelProperty("名称")
  @Size(max = 50, message = "名称长度不能超过50")
  private String name;
}
